package com.wetest.uia2.stub;

import androidx.test.uiautomator.UiDevice;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObject2;
import androidx.test.uiautomator.UiObjectNotFoundException;
import androidx.test.uiautomator.UiSelector;

/* loaded from: classes9.dex */
public class ObjInfo {
    private Rect _bounds;
    private boolean _checkable;
    private boolean _checked;
    private int _childCount;
    private String _className;
    private boolean _clickable;
    private String _contentDescription;
    private boolean _enabled;
    private boolean _focusable;
    private boolean _focused;
    private boolean _longClickable;
    private String _packageName;
    private String _resourceName;
    private boolean _scrollable;
    private boolean _selected;
    private String _text;
    private Rect _visibleBounds;

    public static final ObjInfo getObjInfo(UiObject obj) throws UiObjectNotFoundException {
        return new ObjInfo(obj);
    }

    public static final ObjInfo getObjInfo(UiSelector selector) throws UiObjectNotFoundException {
        return new ObjInfo(UiDevice.getInstance(null).findObject(selector));
    }

    public static final ObjInfo getObjInfo(UiObject2 obj) {
        return new ObjInfo(obj);
    }

    private ObjInfo(UiObject obj) throws UiObjectNotFoundException {
        this._bounds = Rect.from(obj.getBounds());
        this._checkable = obj.isCheckable();
        this._checked = obj.isChecked();
        this._childCount = obj.getChildCount();
        this._clickable = obj.isClickable();
        this._contentDescription = obj.getContentDescription();
        this._enabled = obj.isEnabled();
        this._focusable = obj.isFocusable();
        this._focused = obj.isFocused();
        this._longClickable = obj.isLongClickable();
        this._packageName = obj.getPackageName();
        this._scrollable = obj.isScrollable();
        this._selected = obj.isSelected();
        this._text = obj.getText();
        this._visibleBounds = Rect.from(obj.getVisibleBounds());
        this._className = obj.getClassName();
    }

    private ObjInfo(UiObject2 obj) {
        this._bounds = Rect.from(obj.getVisibleBounds());
        this._checkable = obj.isCheckable();
        this._checked = obj.isChecked();
        this._childCount = obj.getChildCount();
        this._clickable = obj.isClickable();
        this._contentDescription = obj.getContentDescription();
        this._enabled = obj.isEnabled();
        this._focusable = obj.isFocusable();
        this._focused = obj.isFocused();
        this._longClickable = obj.isLongClickable();
        this._packageName = obj.getApplicationPackage();
        this._scrollable = obj.isScrollable();
        this._selected = obj.isSelected();
        this._text = obj.getText();
        this._visibleBounds = Rect.from(obj.getVisibleBounds());
        this._className = obj.getClassName();
        this._resourceName = obj.getResourceName();
    }

    public Rect getBounds() {
        return this._bounds;
    }

    public void setBounds(Rect bounds) {
        this._bounds = bounds;
    }

    public Rect getVisibleBounds() {
        return this._visibleBounds;
    }

    public void setVisibleBounds(Rect visibleBounds) {
        this._visibleBounds = visibleBounds;
    }

    public int getChildCount() {
        return this._childCount;
    }

    public void setChildCount(int childCount) {
        this._childCount = childCount;
    }

    public String getClassName() {
        return this._className;
    }

    public void setClassName(String className) {
        this._className = className;
    }

    public String getContentDescription() {
        return this._contentDescription;
    }

    public void setContentDescription(String contentDescription) {
        this._contentDescription = contentDescription;
    }

    public String getPackageName() {
        return this._packageName;
    }

    public void setPackageName(String packageName) {
        this._packageName = packageName;
    }

    public String getText() {
        return this._text;
    }

    public void setText(String text) {
        this._text = text;
    }

    public boolean isCheckable() {
        return this._checkable;
    }

    public void setCheckable(boolean checkable) {
        this._checkable = checkable;
    }

    public boolean isChecked() {
        return this._checked;
    }

    public void setChecked(boolean checked) {
        this._checked = checked;
    }

    public boolean isClickable() {
        return this._clickable;
    }

    public void setClickable(boolean clickable) {
        this._clickable = clickable;
    }

    public boolean isEnabled() {
        return this._enabled;
    }

    public void setEnabled(boolean enabled) {
        this._enabled = enabled;
    }

    public boolean isFocusable() {
        return this._focusable;
    }

    public void setFocusable(boolean focusable) {
        this._focusable = focusable;
    }

    public boolean isFocused() {
        return this._focused;
    }

    public void setFocused(boolean focused) {
        this._focused = focused;
    }

    public boolean isLongClickable() {
        return this._longClickable;
    }

    public void setLongClickable(boolean longClickable) {
        this._longClickable = longClickable;
    }

    public boolean isScrollable() {
        return this._scrollable;
    }

    public void setScrollable(boolean scrollable) {
        this._scrollable = scrollable;
    }

    public boolean isSelected() {
        return this._selected;
    }

    public void setSelected(boolean selected) {
        this._selected = selected;
    }

    public String getResourceName() {
        return this._resourceName;
    }

    public void setResourceName(String resourceName) {
        this._resourceName = resourceName;
    }
}